package com.orchid.community.models.mapper;

import com.orchid.community.models.DTO.TagListParam;
import com.orchid.community.models.DTO.TagRequestDTO;
import com.orchid.community.models.entity.Tags;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TagsMapper {
    int countByName(String name);

    int createTag(Tags tags);

    Tags getById(Integer id);

    int updateById(Tags tag);

    Tags selectByName(@Param("name") String name, @Param("id") Integer id);

    List<TagRequestDTO> getPageList(TagListParam param);

    List<String> getTagsByUserId(String userId);
}
